home *** CD-ROM | disk | FTP | other *** search
/ Complete Internet Archive / Complete Internet Archive.iso / Web Boards / WebForum_tar(2).Z / WebForum_tar(2) / WebForum / src / periodmail.pl < prev    next >
Encoding:
Text File  |  1994-12-15  |  477 b   |  23 lines

  1. #
  2. # a command that should be called periodically for sending out
  3. # queued mail messages
  4. #
  5.  
  6. require "ctime.pl";
  7.  
  8. select((select(STDOUT), $| = 1)[0]);
  9.  
  10. print "==============================\n";
  11. print &ctime(time),"\n";
  12. opendir(QUE,"MAILQUEUE") || die "MAILQUEUE not found!\n";
  13. @mdir=readdir(QUE);
  14. close(QUE);
  15.  
  16. for (@mdir) {
  17.     next if $_ eq '.';
  18.     next if $_ eq '..';
  19.     print "Dealing with MAILQUEUE/$_\n";
  20.     system("SENDMAIL MAILQUEUE/$_");
  21.     unlink("MAILQUEUE/$_");
  22. }
  23.